<template>
  <div class="app-container">
    <div style="width: 50%; float: left">
      <el-card class="filter-container" shadow="never">
        <div>
          <i class="el-icon-list"></i>
          <span>PLUSOne</span>
        </div>
      </el-card>

      <el-table
        header-cell-name="plusOne"
        ref="adminTable"
        :data="plusOne"
        v-loading="listLoading"
        border
      >
        <el-table-column label="企业名称" align="left">
          <template slot-scope="scope">{{ scope.row.corpName }}</template>
        </el-table-column>
        <el-table-column label="获客时间" align="left">
          <template slot-scope="scope">{{ scope.row.getCreateTime }}</template>
        </el-table-column>
        <el-table-column label="创建时间" align="left">
          <template slot-scope="scope">{{
            scope.row.createTime || scope.row.openSeaTime
          }}</template>
        </el-table-column>
      </el-table>
    </div>

    <div   class="eltable">
      <el-card class="filter-container" shadow="never">
        <div>
          <i class="el-icon-list"></i>
          <span>PLUSN</span>
        </div>
      </el-card>

      <el-table
        ref="adminTable"
        :data="plusN"
      
        v-loading="listLoading"
        border
      >
        <el-table-column label="企业名称" align="left">
          <template slot-scope="scope">{{ scope.row.corpName }}</template>
        </el-table-column>
        <el-table-column label="获客时间" align="left">
          <template slot-scope="scope">{{ scope.row.getCreateTime }}</template>
        </el-table-column>
        <el-table-column label="创建时间" align="left">
          <template slot-scope="scope">{{
            scope.row.createTime || scope.row.openSeaTime
          }}</template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  name: "normal",
  props: {
    list: {
      type: Array,
      default: [],
    },
    listLoading: {
      type: Boolean,
      default: false,
    },
  },
  watch: {
    list(val) {
      console.log("val", val);
      this.plusOne = [];
      this.plusN = [];
      for (var i = 0; i < val.length; i++) {
        if (0 == val[i].plusType) {
          this.plusOne.push(val[i]);
          continue;
        }
        this.plusN.push(val[i]);
      }
    },
  },
  data() {
    return {
      plusN: [],
      plusOne: [],
    };
  },
};
</script>

<style lang="less" scoped>

.eltable {
  width: 50%;
  float: right;
  position: relative;
  right: 0px;
  left: 11px;
}
</style>
